home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
dev
/
misc
/
egs.lha
/
EGS
/
EGS_Devels
/
Examples
/
EGS_Requester
/
makegadget.c
< prev
next >
Wrap
Text File
|
1993-02-16
|
2KB
|
79 lines
/**
** Author: mvk
** Date: 18. Dezember 1992
** 09 Jan 1993 mvk
**
** (C) by VIONA-Development 1991,1993
**
** Create some Gadgets
**
**/
EB_StrArray text =
{
"HHH & MVK Alpha-Version",
"from 09 Jan 1993 for Demo",
"© by VIONA Development", NULL};
EB_StrArray Gads1 =
{"Record", "Play", "Load", "Save", NULL};
EB_StrArray2 Gadgs =
{&Gads1, NULL};
EI_WindowPtr
CreateGads(EI_WindowPtr win)
{
EB_GadBoxPtr box, root, help;
con = EB_CreateGadContext(NULL, NULL, -1, -1);
if (con == NULL)
return (NULL);
box = EB_CreateMaster(con, 0, 0);
if (box == NULL)
return (NULL);
help = EB_CreateHorizBox(con);
EB_AddLastSon(help, EB_CreateHorizFill(con, 0, 0));
EB_AddLastSon(help, EB_CreateMultiAction2(con, &Gadgs, 0x1000));
EB_AddLastSon(help, EB_CreateHorizFill(con, 0, 0));
root = EB_CreateVertiBox(con);
if (root == NULL)
return (NULL);
EB_AddLastSon(root, EB_CreateMultiText(con, &text));
EB_AddLastSon(root, help);
EB_AddLastSon(box, root);
root = EB_CreateMasterWindow(con, win, box);
if (EB_ProcessGadBoxes(con, root))
{
if (win == NULL)
{
con->NewWin->IDCMPFlags = myEdcmpFlags;
con->NewWin->Title = "REQUESTER DEMO";
con->NewWin->Flags |= myWinFlags;
con->NewWin->Bordef.SysGadgets = myWinGads;
con->NewWin->MaxWidth = 800;
con->NewWin->MaxHeight = 600;
return (EI_WindowPtr) EI_OpenWindow(con->NewWin);
}
else
return win;
}
else
return NULL;
}